<?php

namespace App\Http\Controllers\adminShop;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use DB;

class OrderController extends Controller
{
    /**
     * 后台商家订单显示
     */
    public function getDetail(Request $request)
    {
        // 获取店铺id
        $sid = session('pid');
        $data = DB::table('orderdetails')->where('sid','=',$sid)->paginate(5);

        return view('adminShop.order.detail',[
            'data'=>$data,
            'request' => $request

        ]);
    }

    public function getComment(Request $request)
    {
        $con = DB::table('comments')
            ->join('goods','goods.id','=','comments.gid')
            ->select('comments.*','goods.goodsname')
            ->paginate(5);

        return view('adminShop.order.comment',['con'=>$con,'request'=>$request]);
    }

}
